1. Field of the Invention
The present disclosure relates to a distance measuring apparatus, an electronic device including the distance measuring apparatus, a method for measuring distance, and a computer-readable recording medium storing a computer-readable distance measuring program.
2. Description of the Related Art
In safety devices for vehicles, ships, railways, and the like and the field of Factory Automation (FA), there are distance measuring devices that use Time Of Flight (TOF), by which a distance to a distance measurement object is measured based on a time difference between when an irradiating light is projected onto the distance measurement object and when a reflected light arrives.
The distance measuring devices that use the TOF include a light source that projects an irradiating light onto the distance measurement object and a light reception unit, in which the light reception unit has a light receiving element such as a photo diode that receives a reflected light reflected from the distance measurement object and converts the reflected light into a voltage signal, and an optical part such as a lens that introduces the reflected light into the light receiving element.
However, in typical distance measuring devices that use the TOF, the strength of received light signals obtained by receiving and converting a reflected light into electric signals is not constant.
FIG. 1 is a schematic graph depicting a relationship between difference of signal strength of reflected lights and a comparator threshold in the distance measuring device that uses the TOF. In FIG. 1, the ordinate indicates the strength of received light signals in an arbitrary unit and the abscissa indicates time in an arbitrary unit. As illustrated in FIG. 1, among the received light signals in the distance measuring device, the strength of received light signals s1 from a highly reflective object such as reflector disposed in a close location becomes very high due to the highly reflective object and may exceed a detection limit of the light receiving element. In this case, the received light signals s1 detected by the light receiving element exceed a saturation level ss of received signals and is saturated.
In contrast, received light signals s2 from a distance measurement object present at a distant place or received light signals s3 from a distance measurement object formed with a material having low reflectance are very small in comparison with the received light signals s1 from the highly reflective object disposed in a close location. In this case, if a threshold sth of a comparator that converts the received light signals s1 to s3 into temporal signals is set as a fixed value, times t1, t2, and t3 to reach the threshold sth depend on the strength of the received light signals.
As illustrated in FIG. 1, as the strength of the received light signals s1 to s3 becomes lower, a time when the strength of the received light signals s1 to s3 exceeds the threshold sth is delayed further. A pulse width of laser light emitted by a distance measuring device that uses typical pulsed light in the TOF is about several tens of ns, for example.
Accordingly, depending on the strength of the received light signals s1 to s3, even if reflected lights arrive at the light receiving element at the same time, an arrival time of the reflected lights may have an error of 10 ns or more. This error corresponds to a measurement error of 1.5 m or more when converted into distance.
One method for improving measurement accuracy in the distance measuring device is to cause the signal strength to approximate a certain value by feeding a value of the strength of received light signals back to a gain control of an amplifier, for example.
Further, another method for improving the measurement accuracy in the distance measuring device is to measure a peak value of received light signals using a peak hold circuit or the like and to perform time correction depending on a peak value.
However, in the method by which the value of the signal strength is fed back to the gain control of the amplifier, signal strength is not always correspondent.
Further, in the method by which the time correction is performed depending on the peak value, a waveform of the received light signals may be changed depending on a fluctuation in an operating environment or the like.
Further, in the distance measuring device, a received light signal amplifier provides a shot noise component or a circuit noise component upon signal amplification. Accordingly, an electrical noise component at a certain level or more is inevitably generated.
FIG. 2 is a schematic graph illustrating a relationship between received light signals and a comparator threshold if noise is included in reflected lights in the distance measuring device that uses the TOF. In FIG. 2, the ordinate indicates the strength of received light signals s0 in an arbitrary unit, the abscissa indicates time in an arbitrary unit, and broken lines sn indicate a noise level. Further, in FIG. 2, a part of the received light signals s0 in a field surrounded by a circle is enlarged below. As illustrated in FIG. 2, in general, the threshold sth of a comparator is set to have a strength that is about several times the amount of a noise level sn where no reflected lights are input. However, random noise components are added to an original light pulse waveform in the received light signals s0 of a received reflected light.
Accordingly, in a typical distance measuring device, if time detection is performed with a certain threshold sth, a detection time difference Δt may be generated at random due to noise components. An influence of noise will notably appear in particular if the strength of the received light signals s0 is low.
As described above, in a method for measuring distance that uses the typical TOF and the distance measuring device that performs the method for measuring distance, the signal strength of reflected lights is fluctuated and noise is added to received light signals by the amplifier.
In addition, as a distance measuring device for measuring a distance with a high degree of accuracy, there is a proposed device including an integration processing unit that integrates outputs of an amplifier circuit and a distance correction unit that corrects a distance based on an output of the integration processing unit (see Patent Document 1, for example).
Further, as another example of a distance measuring device for measuring a distance with a high degree of accuracy, because a correlation between irradiating signals and received light signals is maximized when a waveform of the irradiating signals corresponds to a waveform of the received light signals, there is a proposed device that calculates a distance to an object based on this correlation (see Patent Document 2, for example).
However, in the technique proposed in Patent Document 1, detection timing depends on the signal strength of reflected lights because the detection timing upon arrival is calculated focusing mainly on rising characteristics of the reflected lights.
Further, in the technique proposed in Patent Document 1, an influence of noise included in received light signals increases because a differential waveform of a signal waveform is used as a method for detecting a rising time of reflected lights.
Further, in the technique proposed in Patent Document 2, if noise components are included in received light signals by the amplifier as described above, the waveform of the irradiating signals does not correspond to the waveform of the received light signals.